﻿<%@ Page Title="Анализ :: Домашняя страница" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Dashboard.aspx.cs" Inherits="Analysis.Admin.Dashboard" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="page_header">
        <h2><img src="<%=ResolveClientUrl("~") %>images/design/dashboard_tt_icon.png" alt="" title="" /> Домашняя страница</h2>
    </div>
    <div class="page_container">
        <asp:Panel ID="sortable_container" runat="server" EnableViewState="False" CssClass="row" ClientIDMode="Static">
            <asp:Panel ID="Report" runat="server" Visible="False" EnableViewState="False" CssClass="block sortable" ClientIDMode="Static">
                <div class="user_management_panel dashboard_panel_img" >
                    <h1>Отчеты</h1>                   
                    <a class="dashboard_read_more" href="№">Перейти к отчетам
                        <div class="top_arrow"></div>
                        <img src="<%=ResolveClientUrl("~") %>images/design/more_right_arrow.png" alt="" title="" />
                    </a>
                </div>
            </asp:Panel>  
            <asp:Panel ID="Address" runat="server" Visible="False" EnableViewState="False" CssClass="block sortable" ClientIDMode="Static">
                <a  href="AP.aspx">
                <div class="contracts_panel dashboard_panel_img">
                    <h1>Адресная программа</h1>
                    <span class="dashboard_read_more">Перейти к адресной программе
                        <div class="top_arrow"></div>
                        <img src="<%=ResolveClientUrl("~") %>images/design/more_right_arrow.png" alt="" title="" />
                    </span>
                </div>
                </a>
            </asp:Panel>
            <asp:Panel ID="Assort" runat="server" Visible="False" EnableViewState="False" CssClass="block sortable" ClientIDMode="Static">
                <a  href="SCU.aspx">
                <div class="contracts_panel dashboard_panel_img">
                    <h1>Ассортимент</h1>
                    <span class="dashboard_read_more">Перейти к ассортименту
                        <div class="top_arrow"></div>
                        <img src="<%=ResolveClientUrl("~") %>images/design/more_right_arrow.png" alt="" title="" />
                    </span>
                </div>
                </a>
            </asp:Panel>
            <asp:Panel ID="MML" runat="server" Visible="False" EnableViewState="False" CssClass="block sortable" ClientIDMode="Static">
                <a  href="TargetSCU.aspx">
                <div class="contracts_panel dashboard_panel_img">
                    <h1>MML</h1>
                    <span class="dashboard_read_more">Перейти к MML
                        <div class="top_arrow"></div>
                        <img src="<%=ResolveClientUrl("~") %>images/design/more_right_arrow.png" alt="" title="" />
                    </span>
                </div>
                </a>
            </asp:Panel>
            <asp:Panel ID="Sales" runat="server" Visible="False" EnableViewState="False" CssClass="block sortable" ClientIDMode="Static">
                <a  href="Sale.aspx">
                <div class="contracts_panel dashboard_panel_img">
                    <h1>Продажи</h1>
                    <span class="dashboard_read_more">Перейти к продажам
                        <div class="top_arrow"></div>
                        <img src="<%=ResolveClientUrl("~") %>images/design/more_right_arrow.png" alt="" title="" />
                    </span>
                </div>
                </a>
            </asp:Panel>
            <asp:Panel ID="UM" runat="server" Visible="False" EnableViewState="False" CssClass="block sortable" ClientIDMode="Static">
                <a  href="UserManagement.aspx">
                <div class="contact_panel dashboard_panel_img">
                    <h1>Пользователи</h1>
                    <span class="dashboard_read_more">Перейти к пользователям
                        <div class="top_arrow"></div>
                        <img src="<%=ResolveClientUrl("~") %>images/design/more_right_arrow.png" alt="" title="" />
                    </span>
                </div>
                </a>
            </asp:Panel>
            <asp:Panel ID="Settings" runat="server" Visible="False" EnableViewState="False" CssClass="block sortable" ClientIDMode="Static">
                <a  href="Setup.aspx">
                <div class="contracts_template_panel dashboard_panel_img">
                    <h1>Настройки</h1>
                        <span class="dashboard_read_more">Перейти к настройкам
                        <div class="top_arrow"></div>
                        <img src="<%=ResolveClientUrl("~") %>images/design/more_right_arrow.png" alt="" title="" />
                        </span>
                </div>
                </a>
            </asp:Panel>
        </asp:Panel>
    </div>
    <script type="text/javascript">
        $(function () {
            $("#sortable_container").sortable({
                update: function (event, ui) {
                    var order = $('#sortable_container').sortable("toArray");
                    var strOrder = '';
                    var length = order.length;
                    for (var i = 0; i < length; i++) {
                        strOrder += order[i];
                        if (i != length - 1) {
                            strOrder +=";"
                        }
                    }
                    
                    $.ajax({
                        type: 'POST',
                        url: 'Dashboard.aspx/SaveOrder',
                        dataType: "json",
                        async: true,
                        cache: false,
                        contentType: 'application/json; charset=utf-8',
                        data: "{'order':" + JSON.stringify(strOrder) + "}",
                        success: function (data) {
                        }
                    });
                }
            });
        });
    </script>
</asp:Content>
